favicon.js ➔ javascript   B
last analyzed

Complexity

Conditions 2

Size

Total Lines 63
Code Lines 49

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 49
dl 0
loc 63
rs 8.669
c 0
b 0
f 0
cc 2

How to fix   Long Method   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
module.exports = function (gulp, plugins, config) {
2
  return function javascript(cb) {
3
    plugins.realFavicon.generateFavicon({
4
      masterPicture: 'assets/logo.svg',
5
      dest: 'assets/favicon',
6
      iconsPath: '.',
7
      design: {
8
        ios: {
9
          pictureAspect: 'backgroundAndMargin',
10
          backgroundColor: '#ffffff',
11
          margin: '14%',
12
          assets: {
13
            ios6AndPriorIcons: false,
14
            ios7AndLaterIcons: false,
15
            precomposedIcons: false,
16
            declareOnlyDefaultIcon: true
17
          },
18
          appName: 'Meshviewer'
19
        },
20
        desktopBrowser: {},
21
        windows: {
22
          pictureAspect: 'whiteSilhouette',
23
          backgroundColor: '#dc0067',
24
          onConflict: 'override',
25
          assets: {
26
            windows80Ie10Tile: false,
27
            windows10Ie11EdgeTiles: {
28
              small: true,
29
              medium: true,
30
              big: true,
31
              rectangle: false
32
            }
33
          },
34
          appName: 'Meshviewer'
35
        },
36
        androidChrome: {
37
          // pictureAspect: 'shadow',
38
          themeColor: '#dc0067',
39
          manifest: {
40
            name: 'Meshviewer',
41
            display: 'standalone',
42
            orientation: 'portrait',
43
            onConflict: 'override',
44
            declared: true
45
          },
46
          assets: {
47
            legacyIcon: false,
48
            lowResolutionIcons: false
49
          }
50
        },
51
        safariPinnedTab: {
52
          pictureAspect: 'silhouette',
53
          themeColor: '#dc0067'
54
        }
55
      },
56
      settings: {
57
        compression: 2,
58
        scalingAlgorithm: 'Mitchell',
59
        errorOnImageTooSmall: false
60
      },
61
      markupFile: config.faviconData
62
    });
63
    return cb();
64
  };
65
};
66